package org.eyeTopLight.dao.init;

import org.apache.ibatis.annotations.Param;
import org.eyeTopLight.vo.GoodsVo;

import java.util.List;

/**
 * 操作数据库的泛型接口
 * @param <T>
 */
public interface GenericDos<T> {
    public boolean add(T obj);

    public boolean removeByPK(T obj);

    public boolean modifyByPk();

    public List<T> query(T obj);

    public Integer queryCount(T obj);

    public List<GoodsVo> queryForPage(@Param("obj") T obj, @Param("startIndex") Integer startIndex, @Param("maxRows")Integer maxRows);

    public T queryByPK(T obj);

    public List<GoodsVo> queryTopN(Integer count);
}
